package com.stcc.portal.controller.dataconfig.ecommerce;

import com.stcc.base.bo.ResponseBase;
import com.stcc.dataConfig.bo.ecommerce.JingDongLoginReqBO;
import com.stcc.dataConfig.bo.ecommerce.QryAllEcommerceRspBO;
import com.stcc.dataConfig.service.ecommerce.JingDongLoginService;
import com.stcc.dataConfig.service.ecommerce.JingDongQgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 描述:京东
 * 项目名:stcc_gl-parent
 * 包名:com.stcc.portal.controller.dataconfig.ecommerce
 * 作者:stcc
 * 创建时间:2021/4/21 17:58
 * 版本:1.0
 */
@Api(tags = "京东")
@Slf4j
@RestController
@RequestMapping(value ="jingDong")
public class JingDongController {

    @DubboReference
    JingDongLoginService jingDongLoginService;
    @DubboReference
    JingDongQgService jingDongQgService;

    @ApiOperation(tags = "京东登录",httpMethod = "POST",value = "/JingDongLogin")
    @ApiImplicitParam(name = "京东入参对象",value = "JingDongRspBO")
    @RequestMapping(value ="/JingDongLogin",method = RequestMethod.POST)
    @ResponseBody
    public QryAllEcommerceRspBO JingDongLogin( @RequestBody JingDongLoginReqBO reqBO){
        QryAllEcommerceRspBO rspBO = jingDongLoginService.jdlogin(reqBO);
        return rspBO;
    }


    @ApiOperation(tags = "京东抢购",httpMethod = "POST",value = "/JingDongQg")
    @ApiImplicitParam(name = "入参对象",value = "JingDongRspBO")
    @RequestMapping(value ="/JingDongQg",method = RequestMethod.POST)
    @ResponseBody
    public ResponseBase JingDongQg(){
        ResponseBase rspBO = jingDongQgService.jingDongQg();
        return rspBO;
    }
}
